// @ts-ignore
/* eslint-disable */
import request from '@/utils/request'

/** getTaskDetail 获取任务详情 GET /api/task */
export async function getTaskDetailUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getTaskDetailUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseTaskVo_>('/api/task', {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** addTask 新建任务 POST /api/task/add */
export async function addTaskUsingPost(body: API.AddTaskRequest, options?: { [key: string]: any }) {
  return request<API.BaseResponseBoolean_>('/api/task/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** deleteTask 删除任务 DELETE /api/task/delete */
export async function deleteTaskUsingDelete(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteTaskUsingDELETEParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/task/delete', {
    method: 'DELETE',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** pageTaskDynamics 分页获取任务动态 POST /api/task/dynamics/page */
export async function pageTaskDynamicsUsingPost(
  body: API.PageTaskDynamicRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageTaskDynamicVo_>('/api/task/dynamics/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** pageTasks 分页获取任务 POST /api/task/page */
export async function pageTasksUsingPost(
  body: API.PageTaskRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageTaskVo_>('/api/task/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** undoTaskList 获取我的未完成任务 POST /api/task/undoTaskList */
export async function undoTaskListUsingPost(options?: { [key: string]: any }) {
  return request<API.BaseResponseListTaskVo_>('/api/task/undoTaskList', {
    method: 'POST',
    ...(options || {})
  })
}

/** updateTask 更新任务 PUT /api/task/update */
export async function updateTaskUsingPut(
  body: API.UpdateTaskRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/task/update', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}
